Api.EnableShutdownHandler method
Attaches a shutdown handler while an EtherCAT connection is being established. This allows KINGSTAR Runtime to keep running when Windows is shut down or crashed. When you are using EnableShutdownHandler, your applications must use the RTX64 function RtAttachShutdownHandler so they can run in the shutdown mode.
RtAttachShutdownHandler is an RT function that can be used only for RTX64 applications. So to take advantage of EnableShutdownHandler you must have an RTX64 user application.
Namespace: IntervalZero.KINGSTAR.Local.Api
Assembly: IntervalZero.KINGSTAR.Local.Api (in IntervalZero.KINGSTAR.Local.dll) Version: 4.4.0.0
Syntax
public KsError EnableShutdownHandler(
bool Active
)
Public Function EnableShutdownHandler(
Active As Boolean
) As KsError
Parameters
Active
Type: bool
True to enable, and false to disable the shutdown handler. By default, it is FALSE.
Return value
A return code of a method.
Remarks
- This method must be called after Create or CreateAsync and before Start.
- To release the computer in shutdown mode, the user application should call Stop for KS to terminate its shutdown handler.
Usable EtherCAT states
ecatOffline
Examples
N/A
See also